package generators;

import gamebackend.Block;

public class ReplaceGenerator extends AbstractGenerator {

	private final Block my_target;
	public ReplaceGenerator(Block the_target, Block the_replace) {
		super(the_replace);
		my_target = the_target;
	}

	@Override
	public void generate(Block[][] blocks) {
		for (int col = 0; col < blocks[0].length; col++) {
			if (blocks[0][col] == my_target) {
				blocks[0][col] = getBlock();
			}
		}

	}

}
